<?php 
require_once("Config.php");
$sql = "Select * From news where newsType=0 order by createTime desc";
$result = mysql_query($sql);
if(!$result){
  echo 'Errow account when query the database.';
  exit();
}

$row = mysql_fetch_array($result);
$latestNewsTitle =  $row['title'];



?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Twilight Cocktail Bar | Beijing</title>
    <script type="text/javascript" src="js/jquery.js">
    </script>
    <script type="text/javascript" src="js/tam.js">
    </script>
    <style type="text/css">
html{-webkit-text-size-adjust:none;}
      .twi {
        margin:0px;
        padding:0px;

        min-height:640px;
        min-width:960px;
        background-color:#333;
        font-family:Verdana, Arial, Helvetica, sans-serif;
      }
      .twi .pandora {
        width:960px;
        height:640px;

        display:block;
        overflow:hidden;
        /*visibility:hidden;*/
        position:relative;

        margin:0 auto;
        background-image:url(images/common-bg.jpg);
        background-position: 625px 50px ;
        background-repeat:no-repeat;
      }
      .twi .index-logo {
        width:325px;
        height:95px;
        display:block;
        position:absolute;
        left:80px;
        top:140px;
        background-image:url(images/index-logo.jpg);

      }
      .twi .index-paragraph {

        width:415px;
        height:150px;
        display:block;
        position:absolute;
        left:80px;
        top:350px;
        background-image:url(images/index-paragraph.jpg);
      }
      .twi .enter-btn {
        width:70px;
        height:32px;
        display:block;
        position:absolute;
        left:425px;
        top:545px;
        background-image:url(images/enter-btn.jpg);
      }
      .twi .enter-btn a {
        width:70px;
        height:32px;
        display:block;
      }
      .twi .enter-btn a:hover {
        width:70px;
        height:32px;
        display:block;
        background-image:url(images/enter-btn-red.jpg);
      }
	.twi .pandora .copyright {
	  width:960px;
	  height:22px;
	  left:0px;
	  line-height:22px;
	  bottom:0px;
	  text-align:center;
	  position:absolute;
	  font-size:10px;
	  color:#666;
	  zIndex:1000;
	}

.shakeNews{
	position:absolute;
	left:0px;
	top:2em;
	height:22px;	
	line-height:22px;
	font-size:11px;
	display:block-inline;
	color:#fff;
}
.shakeNews a{
	font-size:11px;
	font-weight:bold;
	color:#c92c24;
	text-decoration:none;
	display:block-inline;
	
}
.shakeNews a:hover{
  color:#fff;
}
    </style>
  </head>
  <body class="twi" scroll=no>

    <div class="pandora" id="mainStage">
<div class="shakeNews" id="shakeNews" name='shakeNews'>
	<<a href="news.php"> <?php echo $latestNewsTitle ?> </a>>
</div>
      <div class="index-logo">
      </div>
      <div class="index-paragraph">
      </div>
      <div class="enter-btn" id="enterBtn">
        <a href="aboutus.php"></a>
      </div><div class="copyright">
        <strong style="color:#666">Twilight Cocktail Bar</strong> @ Beijing &copy 2010  | Mail:<strong>info@twilightcocktailbar.com</strong> | Tel:<strong> +86 10 5900 5376</strong>
      </div>
    </div>
  </body>
  <script type="text/javascript">

    var app={
    pos:0,
    entropy:1,
	interVal:null,

      init: function() {
 $('#shakeNews').css('width',$('#shakeNews').width());
   app.pos = -parseInt($('#shakeNews').width());
   
			$('#shakeNews').css('left', app.pos+'px');
	
		app.interVal= setInterval(app.activeNews,10);
		
        $('#shakeNews').bind('mouseenter',function(){
			clearInterval(app.interVal);
		});
			 
		$('#shakeNews').bind('mouseleave',function(){
 
			app.interVal = setInterval(app.activeNews,10);
		})
      },
      activeNews:function(){
		  if(app.pos>=960){
		  app.pos = -parseInt($('#shakeNews').width());
			$('#shakeNews').css('left', app.pos+'px');
		  }
			app.pos+=1;
            $('#shakeNews').css('left',(app.pos)+'px');
      }
     

    }
  </script>
  <script type="text/javascript" src="js/common.js">
  </script>
</html>
